#define  _CRT_SECURE_NO_WARNINGS 1	
#include <stdio.h>
#include<stdlib.h>
int* findErrorNums(int* nums, int numsSize, int* returnSize) {

    int* arr = (int*)malloc(sizeof(int) * 2);
    for (int i = 0; i < numsSize - 1; i++)
    {
        for (int j = 0; j < numsSize - i - 1; j++)
        {
            if (nums[j] > nums[j + 1])
            {
                int tmp = nums[j];
                nums[j] = nums[j + 1];
                nums[j + 1] = tmp;
            }
        }
    }
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == nums[i + 1])
        {
            arr[0] = nums[i];
            arr[1] = arr[0] + 1;
        }
    }
    return arr;
}
int main()
{
    int nums[4] = { 2,2 };
    int* pa = NULL;
    int* p = findErrorNums(nums, 2, pa);
    printf("%d %d", *p, *(p + 1));
    return 0;
}



